/**
 * 
 */
package com.cp16.tss.model;

import java.util.ArrayList;
import java.util.Collection;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

/**
 * @author GiangHN
 * @version 1.0
 * @since 01/01/2014
 * 
 */
@Entity
@Table(name="PHONE")
public class Phone {
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private int ID;
	@ManyToMany(mappedBy = "phoneList", cascade = CascadeType.ALL)
	private Collection<Service> serviceList = new ArrayList<Service>();
	@Column(name = "PHONE_NUMBER")
	private int phoneNumber;

	/**
	 * @return the iD
	 */
	public int getID() {
		return ID;
	}

	/**
	 * @param iD
	 *            the iD to set
	 */
	public void setID(int iD) {
		ID = iD;
	}

	/**
	 * @return the serviceList
	 */
	public Collection<Service> getServiceList() {
		return serviceList;
	}

	/**
	 * @param serviceList
	 *            the serviceList to set
	 */
	public void setServiceList(Collection<Service> serviceList) {
		this.serviceList = serviceList;
	}

	/**
	 * @return the phoneNumber
	 */
	public int getPhoneNumber() {
		return phoneNumber;
	}

	/**
	 * @param phoneNumber
	 *            the phoneNumber to set
	 */
	public void setPhoneNumber(int phoneNumber) {
		this.phoneNumber = phoneNumber;
	}

}
